Hue refers to a qualitative appearance that can be assumed by a color, is the primary feature of the color and is the most accurate standard to distinguish different colors. Determination of image hue is an operation widely applied in the field of image processing. After the image hue is determined, suitable elements, such as a background and a frame can be added to an image. For example, the color of a light spot background in the background is painted according to a hue value of an image in the foreground, thereby increasing visual uniformity and integrity of the image.
At present, the process of determining image hue is simple. A method of weighted averaging is usually adopted, and the process thereof specifically includes: adding RGB (red, green, blue) values of colors of all pixels in the image and calculating an average value, so as to obtain hue of the image; or, adding hue values of all pixels in the image and calculating an average value, so as to obtain hue of the image.
The image hue calculated by the method of weighted averaging is inaccurate. For example, for an image that is half pure red and half pure green, the calculated average value is pure yellow, so the image hue is distorted.